package com.acme.faturamento.model.entity;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

/**
 * @author Reinaldo
 *
 */
@Entity
@Table(name = "natureza_operacao")
@SequenceGenerator(name = "natop_sequence", sequenceName = "natop_id_seq")
@TableGenerator(name = "natop_id", table = "chaves_primarias", pkColumnName = "chave", pkColumnValue = "natureza_operacao", valueColumnName = "valor")
public class NaturezaOperacao implements Serializable {
    private Long id;
    private Uf ufOrigem;
    private Uf ufDestino;
    private String descricao;
    private Double icms;
    private String cfop1;
    private String cfop2;
    private String tabelaIcmsB;

    public String getTabelaIcmsB() {
        return tabelaIcmsB;
    }

    public void setTabelaIcmsB(String tabelaIcmsB) {
        this.tabelaIcmsB = tabelaIcmsB;
    }

    public String getCfop1() {
        return cfop1;
    }

    public void setCfop1(String cfop1) {
        this.cfop1 = cfop1;
    }

    public String getCfop2() {
        return cfop2;
    }

    public void setCfop2(String cfop2) {
        this.cfop2 = cfop2;
    }

    public String getDescricao() {
        return descricao;
    }

    public void setDescricao(String descricao) {
        this.descricao = descricao;
    }

    public Double getIcms() {
        return icms;
    }

    public void setIcms(Double icms) {
        this.icms = icms;
    }

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "natop_sequence")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @ManyToOne
    public Uf getUfDestino() {
        return ufDestino;
    }

    public void setUfDestino(Uf ufDestino) {
        this.ufDestino = ufDestino;
    }

    @ManyToOne
    public Uf getUfOrigem() {
        return ufOrigem;
    }

    public void setUfOrigem(Uf ufOrigem) {
        this.ufOrigem = ufOrigem;
    }

}
